<div class="misc container">
	
	<h2><?php echo __d('admin', 'Animals'); ?></h2>
	
	<div class="toolbox">
	<?php echo $this->Html->link(__d('admin', 'Create'), array('action' => 'create_animal'), array('class' => 'btn btn-primary')); ?>
	</div>
	
	<?php if( $animals ): ?>
	<table class="table">
		<tr>
			<th><?php echo __d('admin', 'ID'); ?></th>
			<th><?php echo __d('admin', 'Name'); ?></th>
			<th><?php echo __d('admin', 'Description'); ?></th>
			<th></th>
		</tr>
		<?php foreach($animals as $animal): ?>
		<tr>
			<td><?php echo $animal['Animal']['id']; ?></td>
			<td><?php echo h($animal['Animal']['name']); ?></td>
			<td><?php echo $this->Text->truncate($animal['Animal']['description'], 80); ?></td>
			<td class="actions">
				<?php
				echo $this->Html->link(
					'<span class="glyphicon glyphicon-pencil"></span>',
					array('action' => 'edit_animal', $animal['Animal']['id']),
					array('escape' => false)
				);
				echo $this->Html->link(
					'<span class="glyphicon glyphicon-trash"></span>',
					array('action' => 'delete_animal', $animal['Animal']['id']),
					array('escape' => false),
					__d('admin', 'Are you sure you want to delete this item?')
				);
				?>
			</td>
		</tr>
		<?php endforeach; ?>
	</table>
	<?php else: ?>
	<div class="alert alert-info"><?php echo __d('admin', 'Nothing to show here!'); ?></div>
	<?php endif; ?>
	
</div>